<?php
namespace Admin\Model;
use Think\Model;

class AdminModel extends Model {
    //设置私有的属性
    private $_db = '';
    public function __construct(){
        $this->_db = M('admin');
    }
    public function getAdminByUsername($username){
        $ret = $this->_db->where('username= "'. $username .'"' )->find();
        return $ret;
        
    }
}